<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>1.v-for</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo">
      <ul>
        <li v-for="(p,index) in persons" :key="p.id">
          姓名：{{p.name}}，年龄：{{p.age}}，下标：{{index}}
        </li>
      </ul>
    </div>

    <script type="text/javascript">
      new Vue({
        el:'#demo',
        data:{
          persons:[
            {id:'tafsdayt01',name:'马志强',age:90},
            {id:'tafsdayt02',name:'晶晶',age:19},
            {id:'tafsdayt03',name:'跃哥',age:20},
            {id:'tafsdayt04',name:'强哥',age:60},
            {id:'tafsdayt05',name:'飞哥',age:18},
            {id:'tafsdayt06',name:'照片骗子',age:32},
          ]
        }
      })
    </script>
  </body>
</html>